#!/sbin/openrc-run

description="cloud-init ds-identify"

depend() {
  after localmount
  before net
  before cloud-init-local
}

start() {
  if grep -q 'cloud-init=disabled' /proc/cmdline; then
    ewarn "$RC_SVCNAME is disabled via /proc/cmdline."
  elif test -e /etc/cloud/cloud-init.disabled; then
    ewarn "$RC_SVCNAME is disabled via cloud-init.disabled file"
  else
    ebegin "$description"
    /usr/libexec/cloud-init/ds-identify
    eend $?
  fi
}
